#repr
Description: Convert to string by calling the object’s __repr__
method. See also ascii.
def repr(obj):
'''
Convert to string (calls the object's `__repr__` method)
:param obj: An object
:return: The string returned by obj.__repr__
'''
Example:
class Cat:
def __repr__(self) -> str:
return "I am a 喵喵"
cat = Cat()
print(repr(cat))